package de.lulusoft.anothertorrent.gui.views.Providers;

import java.util.ArrayList;

import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.swt.graphics.Image;

import de.lulusoft.anothertorrent.gui.AnotherTorrentGui;




public class OverviewViewLabelProvider implements ILabelProvider {
	
	private static Image viewImage = null;

	@Override
	public Image getImage(Object element) {
		if (element instanceof String)
		{
			if (viewImage == null)
				viewImage = AnotherTorrentGui.createImage("eye.png");
			return viewImage;
		}
		return null;
	}

	@Override
	public String getText(Object element) {
		if (element instanceof ArrayList)
			return "Views";
		else if (element instanceof String)
		{
			String viewName = (String) element;
			return viewName;
		}
		return null;
	}

	@Override
	public void addListener(ILabelProviderListener listener) {
	}

	@Override
	public void dispose() {
	}

	@Override
	public boolean isLabelProperty(Object element, String property) {
		return false;
	}

	@Override
	public void removeListener(ILabelProviderListener listener) {
	}

}
